package me.CSmethod.demo;

import java.util.Scanner;

public class Text32 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入机票原价");
        int ticket = sc.nextInt();
        System.out.println("请输入当前月份");
        int month = sc.nextInt();
        System.out.println("请输入当前购买的舱位 0 头等舱 1 经济舱");
        int seat = sc.nextInt();

        switch (month) {

            case 5, 6, 7, 8, 9, 10:
                if (seat == 0) {
                    ticket = (int)(ticket * 0.9);
                } else if (seat == 1) {
                    ticket = (int)(ticket * 0.85);
                } else {
                    System.out.println("您输入的舱位有误");
                }
                break;

            case 1, 2, 3, 4, 11, 12:
                if (seat == 0) {
                    ticket = (int)(ticket * 0.7);
                } else if (seat == 1) {
                    ticket = (int)(ticket * 0.65);
                } else {
                    System.out.println("您输入的舱位有误");
                }
                break;

            default:
                System.out.println("您输入的月份有误");
                break;
        }
        System.out.println("您需要支付的机票价格为" + ticket);
    }
}
